package com.zhuangwei.service.impl;

import com.zhuangwei.mapper.UserMapper;
import com.zhuangwei.po.SysUser;
import com.zhuangwei.service.UserService;
import org.springframework.stereotype.Service;
import org.springframework.util.Assert;

/**
 * @author LeviCoder
 * @create 2019-03-09 13:46
 */
@Service
public class UserServiceImpl implements UserService {

    private UserMapper userMapper;
    public void userMapper(UserMapper userMapper){
        this.userMapper = userMapper;
    }

    @Override
    public SysUser queryByid(Integer id) {
        Assert.notNull(id, "id不能为空");
        return userMapper.selectByPrimaryKey(id);
    }
}
